-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
permissions: add self-checkout #1222
Conversation
f589607
to
9f1d393
Compare
loan = kwargs.get("record", {}) | ||
is_patron_current_user = current_user.id == int(loan.get("patron_pid")) | ||
loan = kwargs["record"] | ||
is_patron_current_user = current_user.id == int(loan["patron_pid"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really avoid using .get
when the dict field is required. We need to fail early in these cases.
@@ -163,36 +168,41 @@ def __init__(self, record): | |||
super().__init__(UserNeed(int(record["patron_pid"])), backoffice_access_action) | |||
|
|||
|
|||
_is_authenticated_user = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved outside to declare them once, and not on each func call.
4a050bf
to
91ff204
Compare
setup.cfg
Outdated
@@ -28,6 +28,7 @@ zip_safe = False | |||
install_requires = | |||
# Invenio core modules | |||
invenio-app>=1.3.4,<1.4.0 | |||
invenio-db[postgresql,mysql]>=1.0.14,<2.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this install both dbs? also, seems like versioning is missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will install only the drivers/packages, we do this everywhere now.
Versioning was optional, it is now installed by default.
@@ -26,6 +26,11 @@ def get_active_loan_pid_and_item_pid(): | |||
if total > 0: | |||
return t["pid"], active_loan[0]["pid"] | |||
|
|||
item = Item.get_record_by_pid("itmeid-1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, probably this is breaking tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
ab4f66d
to
0fb8b73
Compare
0fb8b73
to
42277a3
Compare
No description provided.